package com.xdb.sqlparser.dialect.oracle.ast.statement;

import java.util.ArrayList;
import java.util.List;

import com.xdb.sqlparser.ast.SQLExpr;
import com.xdb.sqlparser.dialect.oracle.ast.OracleSQLObjectImpl;
import com.xdb.sqlparser.dialect.oracle.visitor.OracleASTVisitor;

public class OracleSelectForUpdate extends OracleSQLObjectImpl {

	private final List<SQLExpr> of = new ArrayList<SQLExpr>();

	private boolean notWait = false;
	private SQLExpr wait;
	private boolean skipLocked = false;

	public OracleSelectForUpdate() {

	}

	public boolean isNotWait() {
		return notWait;
	}

	public void setNotWait(boolean notWait) {
		this.notWait = notWait;
	}

	public SQLExpr getWait() {
		return wait;
	}

	public void setWait(SQLExpr wait) {
		this.wait = wait;
	}

	public boolean isSkipLocked() {
		return skipLocked;
	}

	public void setSkipLocked(boolean skipLocked) {
		this.skipLocked = skipLocked;
	}

	public void accept0(OracleASTVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, this.of);
			acceptChild(visitor, this.wait);
		}

		visitor.endVisit(this);
	}

	public List<SQLExpr> getOf() {
		return this.of;
	}
}
